<%= simple_form_for([@warehouse,@product]) do |f| %>
  <%= f.error_notification %>
  <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>


<div class="row">
	<div class="col-md-6">
		<%= f.input :pn, label: "物料编码" %>
	</div>
	<div class="col-md-6">
		<%= f.association :warehouse, label_method: :name, value_method: :id ,label: "仓库" %>
	</div>
</div>
<div class="row">
	<div class="col-md-6">
		<%= f.input :name, label: "产品名称" %>
	</div>
	<div class="col-md-6">
		<%= f.input :desc, label: "规格型号" %>
	</div>
</div>

<div class="row">
	<div class="col-md-6">
		<%= f.input :unit, collection: Dict.find_by(code:'UNIT').dict_values,:label_method => :value,:value_method => :value, label: "单位" %>		
	</div>
	<div class="col-md-6">
		<%= f.input :quantity, label: "数量" %>
	</div>
</div>


<div class="horizontal-space"></div>
<div class="form-actions">
	<%= f.button :submit, '提交',class: "btn btn-blue btn-xs" %>
</div>
<% end %>

